Goal-directed fluid optimization